<template>
	<div>
		<div class="graybg"></div>
		<div class="each_bg"><img src="../assets/eachbg.png"/></div>
		<!--头部-->
		<header id="header">
			<div class="header header_bg clearfix">
				<div class="header_left pull-left">
					<i class="iconfont baiColor" onclick="javascript:history.back(-1)">&#xe612;</i>
				</div>
				<div class="header_center baiColor">收款二维码</div>
				<router-link to="/wcollectionrecord">
					<div class="header_right baiColor"><i>收款记录</i></div>
				</router-link>
			</div>
		</header>
		<div class="main">
			<div class="code_main marginAuto">
				<div class="code_main_header">
					<span>二维码收款</span>
				</div>
				<div class="sid">
					<span>收款人编码:{{uid}}</span>
				</div>
				<div class="code_img">
					<img :src="imgURL+'/Home/User/receivables/token/'+info" alt="二维码"/>
				</div>
				<div class="save">
					<span>保存图片</span>
				</div>
			</div>
		</div>
	</div>
</template>

<script>
	export default{
		data(){
			return{
				imgURL:this.imgURL,
				info:"",	//秘钥
				uid:""//收款人id
			}
		},
		mounted(){
			let _this = this;
			_this.info = window.localStorage.data;
			var info = _this.info;
			var arr = ['u_invite'];
			var params = new URLSearchParams();
			params.append('token', info);	//客户秘钥（信息）
			params.append('arr',arr);
			this.$axios({
			    url:"Home/Config/getUserField",
				method:"post",
				data:params
			 }).then(function(res){
			  	_this.uid = res.data.data.u_invite;
			}).catch(function(err){
				console.log(err)	
			})
		}
		
	}
</script>

<style scoped="scoped">
	@import "../css/public.css";
	.header .header_right i{
		font-size: 14px;
	}
	.each_bg{
		position: fixed;
		width: 100%;
		height: 300px;
		z-index: -1;
	}
	.main{
		padding-top: 50px;
	}
	.code_main{
		width: 90%;
		height: 300px;
		background: #fff;
		border-radius: 8px;
	}
	.code_main_header,.sid{
		line-height: 30px;
		font-size:16px;
		color: #033333;
		text-align: center;
	}
	.sid{
		margin-top: 25px;
	}
	.code_img{
		width:150px;
		height: 150px;
		margin: auto;
		background:#F3961F;
	}
	.code_img img,.each_bg img{
		width: 100%;
		height: 100%;
	}
	.save{
		height: 52px;
		line-height: 50px;
		font-size: 16px;
		color:#F3961F;
		text-align: center;
	}
	
</style>